<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@page import="fisio.global.Const"%>
<%@page import="fisio.model.Fisioterapeuta"%>

<% Fisioterapeuta usuario = (Fisioterapeuta)request.getSession().getAttribute("usuario"); %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Minha conta</title>
	
	<link rel="stylesheet" type="text/css" href="<%= Const.CSS_JQUERY_UI %>" />
	<link rel="stylesheet" type="text/css" href="<%= Const.CSS_GLOBAL %>" />
	<link rel="stylesheet" type="text/css" href="<%= Const.CSS_CAD_DEFAULT %>" />
	<link rel="stylesheet" type="text/css" href="<%= Const.CSS_MINHA_CONTA %>" />
	
	<script type="text/javascript" src="<%= Const.JS_JQUERY %>"></script>
	<script type="text/javascript" src="<%= Const.JS_JQUERY_UI %>"></script>
	<script type="text/javascript" src="<%= Const.JS_MASK %>"></script>
	<script type="text/javascript" src="<%= Const.JS_MASCARAS %>"></script>
	<script type="text/javascript" src="<%= Const.JS_DINAMISMO_MINHA_CONTA %>"></script>
</head>

<body>
	<div id="cadDefaultWrapper">
		<%@include file="dockbar.jsp"%>
		
		<div id="cadDefaultContainer">
		
			<div id="divFoto" class="esquerda">
				<div id="foto"></div>
				<br />
				<a href="#alterarFoto">Alterar foto</a>
				<br />
			</div>
			
			<form name="formMinhaConta" id="formMinhaConta" class="form-cad" method="post" action="<%= Const.SERVLET_FISIOTERAPEUTA %>">
				<input name="op" value="editarConta" type="hidden" />
				
				<label>Nome</label>
				<input name="nome" type="text" value="<%= usuario.getNome() %>" />
				<br />
				
				<label>CPF</label>
				<input class="mask-cpf" name="cpf" type="text" value="<%= usuario.getCpf() %>" />
				<br />
				
				<label>Crefito</label>
				<input class="mask-crefito" name="crefito" type="text" value="<%= usuario.getCrefito() %>" />
				<br />
				
				<label>Email</label>
				<input name="email" type="text" value="<%= usuario.getEmail() %>" />
				<br />
				
				<label>Celular</label>
				<input class="mask-fone" name="celular" type="text" value="<%= usuario.getCelular() %>" />
				<br />
				
				<label>Perfil</label>
				<span class="perfil"><strong><%= (usuario.temPerfilAdmin()?"Administrador":"Fisioterapeuta") %></strong></span>
				<br />
				<br />
				<br />
				
				<input id="alertas" name="alertas" type="checkbox" value="True" />
				<span>Habilitar alertas por email</span>
				
				<a id="alterarSenha" href="">Alterar senha</a>
				<br />
				<br />
				<br />
				
				<span>Formação</span>
				<br/>
				<textarea name="formacao"><%= usuario.getFormacao() %></textarea>
				<br />
				
				<input type="submit" value="Salvar" />
			</form>
		</div>
		<br class="cleaner" />
		
		<%@include file="footer.jsp"%>
	</div>
	
	<div id="dialogSenha">
		<form name="formSenha" id="formSenha" class="form-cad" method="post" action="<%= Const.SERVLET_ACESSO %>">		
			<input type="hidden" name="op" value="alterarSenha" />
			
			<label>Senha atual</label>
			<input id="senhaAtual" name="senhaAtual" type="password" />
			<br />
			
			<label>Nova senha</label>
			<input id="senhaNova" name="senhaNova" type="password" />
			<br />
			
			<label>Confirme a nova senha</label>
			<input id="senhaConfirm" name="senhaConfirm" type="password" />
			<br />
			
			<br />
			<span id="box" class="hidden msg-advert"></span>
		</form>
	</div>
</body>
</html>